﻿<?xml version="1.0" encoding="UTF-8"?>
<form title="产品成本" icon="cube.gif" description="" xmlns="http://www.evolutility.com">
  <data dbtable="MRP_CostCheck" splogin="asp.net membership" dbcolumnpk="ID" sppaging="EvoSP_PagedItem @SQLselect, @SQLtable, @SQLfrom, @SQLwhere, @SQLorderby, @SQLpk, @pageid, @pagesize" />
  <panel userid="1" label="基本信息" width="80">
    <field id="1" type="lov" typeid="5" label="产品名称" dbcolumn="ProductID" dbcolumnread="NameAndCode" dbcolumnreadlov="NameAndCode" dbwherelov="MType=5" dbtablelov="View_MaterialNameAndCode" maxlength="2" readonly="2" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="80" />
    <field id="85" type="datetime" typeid="5" label="核算时间" dbcolumn="CheckDate" format="{0:d} {0:t}" dbcolumnread="CheckDate" defaultvalue="_now" maxlength="32" readonly="2" required="1" optional="" fpos="10" search="1" searchadv="1" searchlist="1" height="1" width="20" />
  </panel>
  <panel-details label="" dbtabledetails="View_GetPriceAndCost" dbcolumndetails="CostCheckID" panelid="1">
    <field id="11111" panelid="1" type="text" typeid="5" label="客户编号" dbcolumn="CustomerCode" dbcolumnread="CustomerCode" maxlength="32" readonly="1" required="1" optional="" fpos="10" search="1" searchadv="1" searchlist="1" height="1" width="30" />
    <field id="1" panelid="1" type="text" typeid="5" label="公司名称" dbcolumn="CompanyName" dbcolumnread="CompanyName" maxlength="128" readonly="0" required="1" optional="" fpos="10" search="1" searchadv="1" searchlist="1" height="1" width="70" />
    <field id="1197" panelid="1" type="decimal" typeid="9" label="加工成本" dbcolumn="ProcessCost" dbcolumnread="ProcessCost" maxlength="6" readonly="0" required="1" optional="" fpos="60" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="2197" panelid="1" type="decimal" typeid="9" label="材料成本" dbcolumn="MaterialCost" dbcolumnread="MaterialCost" maxlength="6" readonly="0" required="1" optional="" fpos="60" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="3197" panelid="1" type="decimal" typeid="9" label="税费" dbcolumn="TaxCost" dbcolumnread="TaxCost" maxlength="6" readonly="0" required="1" optional="" fpos="60" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="1197" panelid="1" type="decimal" typeid="9" label="售价" dbcolumn="Price" dbcolumnread="Price" maxlength="6" readonly="0" required="1" optional="" fpos="60" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="147" panelid="1" type="formula" typeid="10" label="毛利" dbcolumn="(T.[Price]-T.[MaterialCost]-T.[ProcessCost]-T.[TaxCost])/T.[Price]" format="P" dbcolumnread="ProfitRate" maxlength="5" readonly="1" required="1" optional="" fpos="30" search="0" searchadv="0" searchlist="1" height="1" width="10" />

  </panel-details>
  <panel-details panelid="2" label="产品材料核价" dbtabledetails ="MRP_CostCheckDetail" dbcolumndetails="CheckID">
    <field id="1146" panelid="2" type="lov" typeid="5" label="材料名称" dbcolumn="MaterialID" dbcolumnread="Name" dbcolumnreadlov="Name" dbwherelov="MRP_MaterialMain.MType>5" dbtablelov="MRP_MaterialMain" maxlength="2" readonly="1" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="1147" panelid="2" type="lov" typeid="5" label="供应商名称" dbcolumn="SupplierID" dbcolumnread="SupplierName" dbcolumnreadlov="SupplierName" dbtablelov="View_GetSupplierByMaterial" maxlength="2" readonly="0" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="1197" panelid="2" type="decimal" typeid="9" label="实际采购单价" dbcolumn="UnitPrice" dbcolumnread="UnitPrice" maxlength="6" readonly="0" required="1" optional="" fpos="60" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="1471" panelid="2" type="formula" typeid="10" label="单位" dbcolumn="(SELECT View_UnitType_List.DisplayText FROM         MRP_MaterialMain INNER JOIN View_UnitType_List ON MRP_MaterialMain.Unit = View_UnitType_List.ID where MRP_MaterialMain.ID=T.MaterialID)" 
           dbcolumnread="UnitType" maxlength="5" readonly="1" required="0" optional="" fpos="30" search="0" searchadv="0" searchlist="1" height="1" width="10" />

  </panel-details>
  
</form>
